<!-- 
注册页面
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="js/easyui/demo/demo.css">
<script type="text/javascript" src="js/easyui/jquery-1.8.0.min.js"></script>  
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>  
<script type="text/javascript" src="js/easyui/easyloader.js"></script>
<title>Log in</title>
</head>
<body>
<div>
   <h2>Please Register</h2>
	<div class="demo-info">
		<div class="demo-tip icon-tip"></div>
		<div>Fill the form and submit it.</div>
	</div>
	<div style="margin:10px 0;"></div>
	<div class="easyui-panel" title="Register Form" style="width:400px">
		<div style="padding:10px 0 10px 60px">
	    <form id="ff" method="post" action="register">
	    	<table>
	    		<tr>
	    			<td>Email:</td>
	    			<td><input class="easyui-validatebox" type="text" name="email" data-options="required:true,validType:'email'"></input></td>
	    		</tr>
	    		<tr>
	    			<td>Compnay:</td>
	    			<td><input class="easyui-validatebox" type="text" name="company" data-options="required:true"></input></td>
	    		</tr>
	    		<tr>
	    			<td>Mac:</td>
	    			<td><input class="easyui-validatebox" type="text" name="mac" data-options="required:true"
	    			 readonly="readonly" value="<s:property value="#session.mac"/>"></input></td>
	    		</tr>
	    		<tr>
	    			<td>Ip:</td>
	    			<td><input class="easyui-validatebox" type="text" name="ip" data-options="required:true" 
	    			 readonly="readonly" value='<s:property value="#session.ip"/>'></input></td>
	    		</tr>
	    		<tr>
	    			<td>Register Code:</td>
	    			<td><textarea id="regCode" name="regCode" style="height:60px;"></textarea></td>
	    		</tr>
	    	</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">Submit</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">Clear</a>
	    </div>
	</div>
	<div id="dlg" class="easyui-dialog" title="Prompt"  data-options="iconCls:'icon-save'" style="width:200px;height:100px;padding:10px">
		Please input your register code.
	</div>
	<div>
   您还没有注册此系统，请先输入一个电子邮件，公司名称和注册码。
   如果您的注册码丢失，请联系谭罗乐，QQ:123614257 电话：18607131997 电子邮件:tanluole@gmail.com	
	</div>
	<script>
		function submitForm(){
			var txe = $('#regCode').value;
			if(null==txe){
				$('#dlg').dialog('open'); //打开输入提升框
			}
			$('#ff').form('submit');
			
			
			/*$('#ff').form('load', {
		        url:"register",
		        onSubmit: function(){
		                // do some check
		                // return false to prevent submit;
		        },
		        success:function(data){
		                //返回的data就直接是你的User对象
		               //要什么属性就直接点就行了
		               
		               
		        }
			}); */
		}
		function clearForm(){
			$('#ff').form('clear');
		}
	</script>
</div>
</body>
</html>